home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
toolbar
/
spltrcls
/
hsplittr.frm
< prev
next >
Wrap
Text File
|
1995-11-14
|
4KB
|
136 lines
VERSION 4.00
Begin VB.Form frmHSplitter
Caption = "Horizontal Splitter Test"
ClientHeight = 2865
ClientLeft = 1260
ClientTop = 4800
ClientWidth = 5595
Height = 3270
Left = 1200
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 2865
ScaleWidth = 5595
Top = 4455
Width = 5715
Begin VB.PictureBox picHContainer
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 2640
Left = 105
ScaleHeight = 2640
ScaleWidth = 5370
TabIndex = 0
Top = 105
Width = 5370
Begin VB.TextBox txtBottom
ForeColor = &H00000000&
Height = 1170
Left = 105
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 3
Text = "HSplittr.frx":0000
Top = 1365
Width = 5160
End
Begin VB.TextBox txtTop
ForeColor = &H00000000&
Height = 1170
Left = 105
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Text = "HSplittr.frx":00C2
Top = 105
Width = 5160
End
Begin VB.PictureBox picHSplitter
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
DrawMode = 1 'Blackness
DrawStyle = 5 'Transparent
Height = 45
Left = 105
MouseIcon = "HSplittr.frx":0181
MousePointer = 99 'Custom
ScaleHeight = 45
ScaleWidth = 5265
TabIndex = 1
Top = 1260
Width = 5265
End
End
End
Attribute VB_Name = "frmHSplitter"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
' form position constants
Const FORM_LEFT = 360
Const FORM_TOP = 360
' splitter position and offsets
Const SPLITTER_LEFT = 105
Const SPLITTER_TOP = 105
Const SPLITTER_WIDTH_OFFSET = 315
Const SPLITTER_HEIGHT_OFFSET = 600
' splitter object
Dim moHSplitter As CHorizontalSplitter
Private Sub Form_Load()
' position
Me.Move FORM_LEFT, FORM_TOP
' instantiate the splitter object
Set moHSplitter = New CHorizontalSplitter
moHSplitter.Init picHContainer, picHSplitter, _
txtTop, txtBottom
End Sub
Private Sub Form_Resize()
' resize the container
If Me.WindowState <> vbMinimized Then
moHSplitter.Move SPLITTER_LEFT, _
SPLITTER_TOP, _
Me.Width - SPLITTER_WIDTH_OFFSET, _
Me.Height - SPLITTER_HEIGHT_OFFSET
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
' release the splitter object
Set moHSplitter = Nothing
End Sub
Private Sub picHSplitter_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
' record event
moHSplitter.MouseDown
End Sub
Private Sub picHSplitter_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
' record event
moHSplitter.MouseMove Y
End Sub
Private Sub picHSplitter_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
' record event
moHSplitter.MouseUp
End Sub